// import { Button, Result } from 'antd';
import React, { useEffect, useState, useRef } from 'react';
import { Result, Button } from 'antd'
import { history } from '@umijs/max'

const NoFoundPage = () => {

  return (
    <Result
      status="404"
      title="404"
      subTitle="Sorry, the page you visited does not exist."
      extra={[
        <Button key="back" type="primary" onClick={() => history.back()}>
          返回上一页
        </Button>,
        <Button key="home" type="primary" onClick={() => history.push('/')}>
          回到首页
        </Button>,
      ]}
    />
  );
};
// 修复umi bug兼容404
// NoFoundPage.path = undefined;
export default NoFoundPage;
